package com.itlaobing.spring.ioc.autowire;

import java.util.logging.Logger;

public class Citizen {

    private Logger logger = Logger.getLogger( this.getClass().getName() );

    private Integer id ; // 对应数据库主键(仅仅是个序号而已)
    private String name ;

    private IdentityCard idCard ; // 用来引用另外一个类型的对象

    public Citizen() {
        logger.info( "Citizen()" );
    }

    public Citizen(IdentityCard idCard) {
        logger.info( "Citizen(IdentityCard)" );
        this.idCard = idCard;
    }

    public Citizen(Integer id, String name, IdentityCard idCard) {
        this.id = id;
        this.name = name;
        this.idCard = idCard;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public IdentityCard getIdCard() {
        return idCard;
    }

    public void setIdCard(IdentityCard idCard) {
        logger.info( "setIdCard( IdentityCard )" );
        this.idCard = idCard;
    }
}
